import request from "@/utils/request";
// -------------题目------------

// 根据examId 获取题目列表,不包含答案  /assess/question/listNoAnswerByExam
export const getQuestionListNoAnswerByExamApi = (params) => {
  return request({
    url: `/assess/question/listNoAnswerByExam`,
    method: "get",
    params,
  });
};

// 获取题目答题结果  /assess/question/getResult
export const getQuestionGetResultApi = (params) => {
  return request({
    url: `/assess/question/getResult`,
    method: "get",
    params,
  });
};

// 结束学习任务 /assess/examResult/submit
export const submitExamResultApi = (data) => {
  return request({
    url: `/assess/examResult/submit`,
    method: "put",
    data,
  });
};

// 获取所有题目 /assess/question/list
export const getQuestionListApi = (params) => {
  return request({
    url: `/assess/question/list`,
    method: "get",
    params,
  });
};

// 获取我的回答 /assess/examResult/getInfo
export const getExamResultGetInfoApi = (params) => {
  return request({
    url: `/assess/examResult/getInfo`,
    method: "get",
    params,
  });
};

// 获取证书
export const getExamResultGetCertificateApi = (params) => {
  return request({
    url: `/assess/examResult/getCertificate`,
    method: "get",
    params,
  });
};